package com.hod.roommap.client.model;

import java.util.Date;

/**
 * @gears.table (name=Lodging, namespace=hoddatabase)
 * @gears.index (name= idLodging, fields= idLodging)
 * @gears.namedQuery (name=FindAll, sql="select :Lodging")
 * @gears.namedQuery (name=FindValidLodgingByIdClient, sql="select :Lodging where idClient=? and (checkOut>date('now') or checkOut='')")
 * @gears.namedQuery (name=FindValidLodging, sql="select :Lodging where checkOut>date('now')")
 * @gears.namedQuery (name=ExistsLodgingforBed, sql="select :Lodging where idBed=? AND ? between CheckIn and CheckOut")
 * @gears.namedQuery (name=ExistsLodgingforRoom, sql="select :Lodging where idRoom=? AND ? between CheckIn and CheckOut")
 */
public class Lodging implements GearsDataObject {
	public static final String FIND_ALL = "FindAll";
	public static final String FIND_VALID_LODGING_BY_IDCLIENT = "FindValidLodgingByIdClient";
	public static final String FIND_VALID_LODGING = "FindValidLodging";
	public static final String EXISTS_LODGING_FOR_BED = "ExistsLodgingforBed";
	public static final String EXISTS_LODGING_FOR_ROOM = "ExistsLodgingforRoom";
	/**
     * @gears.id (length=10)
     */
    private Integer idLodging;
    /**
     * @gears.column (references=Client(idClient))
     */
    private Integer idClient;
    /**
     * @gears.column (references=Reservation(idReservation))
     */
    private Integer idReservation;
    /**
     * @gears.column (references=Room(idRoom))
     */
    private Integer idRoom;    
    /**
     * @gears.column (references=Bed(idBed))
     */
    private Integer idBed;
    
    /**
     * @gears.column
     */
    private Date checkIn;
    /**
     * @gears.column
     */
    private Date checkOut;
	/**
     * @gears.column
     */
    private Double total;
    
    
    public Integer getIdLodging() {
		return idLodging;
	}
	public void setIdLodging(Integer idLodging) {
		this.idLodging = idLodging;
	}
	public Integer getIdClient() {
		return idClient;
	}
	public void setIdClient(Integer idClient) {
		this.idClient = idClient;
	}
	public Integer getIdReservation() {
		return idReservation;
	}
	public void setIdReservation(Integer idReservation) {
		this.idReservation = idReservation;
	}
	public Date getCheckIn() {
		return checkIn;
	}
	public void setCheckIn(Date checkIn) {
		this.checkIn = checkIn;
	}
	public Date getCheckOut() {
		return checkOut;
	}
	public void setCheckOut(Date checkOut) {
		this.checkOut = checkOut;
	}
	public Double getTotal() {
		return total;
	}
	public void setTotal(Double total) {
		this.total = total;
	}
	public void setIdRoom(Integer idRoom) {
		this.idRoom = idRoom;
	}
	public Integer getIdRoom() {
		return idRoom;
	}
	public void setIdBed(Integer idBed) {
		this.idBed = idBed;
	}
	public Integer getIdBed() {
		return idBed;
	}
    
    
	
}
